package cn.liontalk.sender;

import cn.liontalk.constant.SystemConstant;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Sender {


    @Autowired
    private AmqpTemplate amqpTemplate;


    /**
     * 发送消息
     */
    public void sendMessage(String message){
        this.amqpTemplate.convertAndSend(SystemConstant.Hello_World_Queue,message);
    }

}
